#ifndef PAGEPASSWORDSET_H
#define PAGEPASSWORDSET_H

#include <QWidget>
#include <QLineEdit>
#include <QKeyEvent>
#include <QEvent>
#include <QTimer>
#include "globalconfig.h"
#include "numberkeyboard.h"

namespace Ui {
class PagePasswordSet;
}

class PagePasswordSet : public QWidget
{
    Q_OBJECT

public:
    explicit PagePasswordSet(QWidget *parent = nullptr);
    ~PagePasswordSet();
    void setPageActive(bool xActive);
signals:
    void returnToMaintMenu();
protected:
     bool eventFilter(QObject *obj, QEvent *event);
private slots:
    void on_Btn_Return_clicked();
    void slotNumber(int i);
    void slotClear();
    void slotOK();
    void slotBackspace();
    void on_Btn_Confirm_clicked();

private:
    Ui::PagePasswordSet *ui;
private:
    NumberKeyBoard *m_pNumKeyBoard;
    QList<QLineEdit *> inputlist;
    QLineEdit *m_pFocusLinedit=NULL;
    bool m_xErrorTimerBusy=false;
};

#endif // PAGEPASSWORDSET_H
